package com.zkthink.ceres.product.entity;


import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_product_discount_config")
@ApiModel(value = "ProductDiscountConfig", description = "折扣配置表")
@AllArgsConstructor
public class ProductDiscountConfig extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @TableField("product_id")
    @Excel(name = "商品id")
    private Long productId;

    /**
     * 商品折扣比例(%)
     */
    @ApiModelProperty(value = "商品折扣比例")
    @TableField("product_discount")
    @Excel(name = "商品折扣比例")
    private Integer productDiscount;

    /**
     * 直接分销折扣比例(%)
     */
    @ApiModelProperty(value = "直接分销折扣比例")
    @TableField("product1_discount")
    @Excel(name = "直接分销折扣比例")
    private Integer product1Discount;

    /**
     * 间接分销折扣比例(%)
     */
    @ApiModelProperty(value = "间接分销折扣比例")
    @TableField("product2_discount")
    @Excel(name = "间接分销折扣比例")
    private Integer product2Discount;


    /**
     * 资深分销折扣比例(%)
     */
    @ApiModelProperty(value = "资深分销折扣比例")
    @TableField("product3_discount")
    @Excel(name = "资深分销折扣比例")
    private Integer product3Discount;



    /**
     * 逻辑删除 1-删除 0-未删除
     */
    @ApiModelProperty(value = "逻辑删除 1-删除 0-未删除")
    @NotNull(message = "逻辑删除 1-删除 0-未删除不能为空")
    @TableField("is_delete")
    @Excel(name = "逻辑删除 1-删除 0-未删除")
    private Integer isDelete;


    @Builder
    public ProductDiscountConfig(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime, Integer isDelete,
                                 Long productId,Integer productDiscount,Integer product1Discount,Integer product2Discount,Integer product3Discount) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.isDelete = isDelete;
        this.productId=productId;
        this.productDiscount=productDiscount;
        this.product1Discount=product1Discount;
        this.product2Discount=product2Discount;
        this.product3Discount=product3Discount;
    }
}
